package com.china08.yxyapi.util;

import org.springframework.stereotype.Component;

@Component
public class AvatarUtil {

    /**
     * 获取用户头像
     */
    public static String getAvatarString(String avatar) {
        if (avatar != null && !avatar.startsWith("http") && !avatar.startsWith("https")) {
            avatar = "https://yxcsp.91yunxiao.com/yxcsp/pull/" + avatar;
        }
        return avatar;
    }

}
